package com.hhxy.login.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hhxy.login.datamodel.Person;
import com.hhxy.login.mapper.PersonMapper;
import com.hhxy.login.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 布禾
 * @since 2022-02-26
 */
//@Service
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements IPersonService {
    @Autowired(required = false)
    private PersonMapper personMapper;

    @Override
    public List<Person> login(){
        List<Person> people = personMapper.selectAll();
        return people;
    }
    @Override
    public int count() {
        return personMapper.selctCount();
    }
}
